package org.wak.scene
{
	import org.wak.baseoneonline.flash.geom.IntPoint;
	import org.wak.character.display.AbstractCharacterDisplay;
	
	/**
	* SceneDefinitions is a class to groups all the parameters involved in the creation
	* of a Scene and it is used to create a new Scene. 
	*/
	public class SceneDefinition implements ISceneDefinition
	{
		// Character of the player 
		private var mCharacterId:String = "";
		
		// Background of the Scene 
		private var mSceneId:String = "";
		
		// Background of the Scene 
		private var mBackgroundId:String = "";
		
		// Size of the tile inside the grid. 
		private var mTileSize:int = 0 ;
		
		// Array with a list of blocked tiles for walk in IntPoint s.   
		private var mBlockedForWalkTiles:Array = null;
		
		// Player Renderer on the Scene.
		private var mPlayerRenderer:AbstractCharacterDisplay = null;
		
		// Player starting point
		private var mPlayerStartingPoint:IntPoint = null;
		
		// Player walk speed
		private var mPlayerWalkSpeed:Number = 50;
		
		// Debug Scene enabled.
		private var mDebugScene:Boolean = false;
		
		// Scale decremente rate, for each pixel away from the camera the scale will be decreased
		// 1X this value.
		private var mScaleRate:Number = 0;
		
		// This value is added to the scaling formula to give a greater max value of scaling.
		private var mScaleBase:Number = 0;
		
		// the array containing the items in the Scene.
		private var mSceneItemsArray:Array ;
		
		// walk behind array
		private var mWbehArr:Array ;
		
		// id of the ambiental sound of the Scene.
		private var mAmbientalSndId:String = "";
		
		// Array of gatespots in the scene
		private var mGateSpotsArray:Array = null ;
		
		// Array of gatespots in the scene
		private var mActionSpotsArray:Array = null ;
		
		// Array of SceneCharData
		private var mCharsOnSceneArray:Array = null ;
		
		public function SceneDefinition()
		{
		}
		
		
		/**
		 * Setter of debug flag of the Scene.
		 */
		 public function set debugEnabled(value:Boolean):void
		 {
		 	mDebugScene = value ;
		 }
		 
		/**
		 * Getter of debug flag of the Scene.
		 */
		 public function get debugEnabled():Boolean
		 {
		 	return mDebugScene;
		 } 
 
		
		/**
		* Setter of the player walk speed into the Scene		
		* 
		* @return the walk speed.		
		*/
		public function set playerWalkSpeed(value:Number):void
		{
			mPlayerWalkSpeed = value ;
		}
		
		/**
		* Getter of the player walk speed into the Scene		
		* 
		* @param value of the walk speed.		
		*/
		public function get playerWalkSpeed():Number
		{
			return mPlayerWalkSpeed;
		}
		
		/**
		* Setter of the player initial position in the Scene		
		* 
		* @param IntPoint with the initial position of the player.		
		*/
		public function set playerStartingPoint(value:IntPoint):void
		{
			mPlayerStartingPoint = value ;
		}
		
		/**
		* Getter of the player initial position in the Scene		
		* 
		* @return IntPoint with the initial position of the player.				
		*/
		public function get playerStartingPoint():IntPoint
		{
			return mPlayerStartingPoint ;
		}
		
		/**
		* Setter of the player renderer on the Scene		
		* 
		* @param AbstractPlayerRenderer to render the player on the Scene.		
		*/
		public function set playerRenderer(value:AbstractCharacterDisplay):void
		{
			mPlayerRenderer = value ;
		}
		
		/**
		* Getter of the player renderer on the Scene		
		* 
		* @return AbstractPlayerRenderer to render the player on the Scene.		
		*/
		public function get playerRenderer():AbstractCharacterDisplay
		{
			return mPlayerRenderer ;
		}
		
		public function get playerCharacter():String
		{
			return mCharacterId ;
		}
		
		public function set playerCharacter(value:String):void
		{
			mCharacterId = value;
		}
		
		/**
		* Setter of blocked for walk tiles array.		
		* 
		* @param Array with IntPoints indicating which tiles are blocked for walk.		
		*/
		public function SetblockedForWalkArray(value:Array):void
		{
			mBlockedForWalkTiles = value ;
		}
		
		public function get blockedForWalkArray():Array
		{
			return mBlockedForWalkTiles ;
		}
		
		
		public function set backgroundId(pBg:String):void
		{
			mBackgroundId = pBg;
		}
		
		
		public function get backgroundId():String
		{
			return mBackgroundId ;
		}
		
		
		public function set sceneId(value:String):void
		{
			mSceneId = value;
		}
		
		public function get sceneId():String
		{
			return mSceneId ;
		}
		
		/**
		* Setter of the width and height of the tile.		
		* 
		* @param pSize Size of the tile in the grid.		
		*/
		public function set tileSize(pSize:int):void
		{
			mTileSize = pSize ;
		}
		
		/**
		* Getter of the width and height of the tile.		
		* 
		* @return Size of the tile in the grid.		
		*/
		public function get tileSize():int
		{
			return mTileSize ;
		}
		
		/**
		* Setter of the scale rate of the Scene		
		* Scale decrement rate, for each pixel away from the camera the scale will be decreased
		* 1X this value.
		* @param pValue new value of the scale rate.		
		*/
		public function set scaleRate(pValue:Number):void
		{
			mScaleRate = pValue ;
		}
		
		/**
		* Getter of the scale rate of the Scene		
		* Scale decrement rate, for each pixel away from the camera the scale will be decreased
		* 1X this value.
		* @return the current scale rate.		
		*/
		public function get scaleRate():Number
		{
			return mScaleRate ;
		}
		
		/**
		* Setter of the scale base of the Scene		
		* This value is added to the scaling formula to give a greater max value of scaling.
		* @param pValue new value of the scale base.		
		*/
		public function set scaleBase(pValue:Number):void
		{
			mScaleBase = pValue ;
		}
		
		/**
		* Getter of the scale base of the Scene		
		* This value is added to the scaling formula to give a greater max value of scaling.
		* @return the current scale base.		
		*/
		public function get scaleBase():Number
		{
			return mScaleBase;
		}
		
		/**
		 * @inheritDoc 
		 */		
		public function get sceneItems():Array
		{
			return mSceneItemsArray ;
		}
		
		/**
		 * @inheritDoc 
		 */		
		public function set SceneItems(value:Array):void
		{
			mSceneItemsArray = value ;
		}
		
		/**
		 * @inheritDoc 
		 */		
		public function get walkBehinds():Array
		{
			return mWbehArr ;
		}
		
		/**
		 * @inheritDoc 
		 */		
		public function set walkBehinds(value:Array):void
		{
			mWbehArr = value ;
		}
		
		/**
		 * @inheritDoc 
		 */		
		public function get ambientalSoundId():String
		{
			return mAmbientalSndId ;
		}
		
		/**
		 * @inheritDoc 
		 */		
		public function set ambientalSoundId(value:String):void
		{
			mAmbientalSndId = value ;
		}
		
		/**
		 * @inheritDoc 
		 */		
		public function get gatespots():Array
		{
			return mGateSpotsArray ;
		}
		
		/**
		 * @inheritDoc 
		 */		
		public function set gatespots(value:Array):void
		{
			mGateSpotsArray = value ;
		}
		
		/**
		 * @inheritDoc 
		 */		
		public function get actionspots():Array 
		{
			return mActionSpotsArray ;
		}
		
		/**
		 * @inheritDoc 
		 */		
		public function get charactersOnScene():Array
		{
			return mCharsOnSceneArray ;
		}
		
		/**
		 * @inheritDoc 
		 */		
		public function set charactersOnScene(value:Array):void
		{
			mCharsOnSceneArray = value ;
		}
		
		
		

	}
}